package ${package.Controller?replace(".controller","")}.sys.controller;

import ${package.Controller?replace(".controller","")}.sys.controller.vo.ValidateInfo;
import ${package.Controller}.vo.response.RespResult;
import ${package.Controller?replace(".controller","")}.sys.service.ValidateService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
* @author yiming
* @title: ValidateController
* @projectName property
* @description: TODO
* @date 2019/6/2715:13
*/
@Slf4j
@Api(tags = {"校验"})
@RestController
@RequestMapping("/admin/validate")
public class ValidateController {
@Autowired
private ValidateService validateService;
@ApiOperation(value = "添加唯一校验")
@RequestMapping(value = "/uniqueAdd", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json;charset=UTF-8")
public RespResult uniqueValidateAdd(ValidateInfo info) {
return RespResult.ok(validateService.uniqueValidateAdd(info));
}
@ApiOperation(value = "更新唯一校验")
@RequestMapping(value = "/uniqueUpdate", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json;charset=UTF-8")
public RespResult uniqueValidateUpdate(ValidateInfo info) {
return RespResult.ok(validateService.uniqueValidateUpdate(info));
}
}
